home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 2001 January / CT_SW0101.ISO / mac / software / betrieb / desktop / dropdrwx.sit / Drop Drawers X 1.5.4 / Drop Drawers X.rsrc / TEXT_128_Default Script.txt < prev    next >
Text File  |  2001-04-10  |  750b  |  22 lines

  1. -- this is executed when the script is run normally
  2. -- the 'on run' and 'end run' lines are optional
  3. on run
  4.     say "Script started"
  5.     say "Script finished"
  6.     display dialog "Script finished." buttons "OK" default button 1
  7. end run
  8.  
  9. -- this is executed whenever data is dragged onto the script
  10. -- data can contain either text or file specs/aliases
  11. -- multiple dragged items appear as a list to the script
  12. on open x
  13.     if class of x is string then
  14.         display dialog ((count words in x) as text) & " words." buttons "OK" default button 1
  15.     else if class of x is alias then
  16.         display dialog "File path: " & x as text buttons "OK" default button 1
  17.     else if class of x is list then
  18.         repeat with i in x
  19.             tell me to open contents of i
  20.         end repeat
  21.     end if
  22. end open